🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / intro / src / commonMain / kotlin / org / meshtastic / feature / intro / PermissionScreenLayout.kt
Displaying Raw • Download
feature/intro/src/commonMain/kotlin/org/meshtastic/feature/intro/PermissionScreenLayout.kt renovate/actions-github-script-9.x (ebc1b6b5) Text, 5.49 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.intro
Tff7b72import T7ee787androidx.compose.foundation.gestures.detectTapGestures
Tff7b72import T7ee787androidx.compose.foundation.layout.Column
Tff7b72import T7ee787androidx.compose.foundation.layout.Spacer
Tff7b72import T7ee787androidx.compose.foundation.layout.fillMaxSize
Tff7b72import T7ee787androidx.compose.foundation.layout.height
Tff7b72import T7ee787androidx.compose.foundation.layout.padding
Tff7b72import T7ee787androidx.compose.foundation.rememberScrollState
Tff7b72import T7ee787androidx.compose.foundation.verticalScroll
Tff7b72import T7ee787androidx.compose.material3.MaterialTheme
Tff7b72import T7ee787androidx.compose.material3.Scaffold
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.getValue
Tff7b72import T7ee787androidx.compose.runtime.mutableStateOf
Tff7b72import T7ee787androidx.compose.runtime.remember
Tff7b72import T7ee787androidx.compose.runtime.setValue
Tff7b72import T7ee787androidx.compose.ui.Alignment
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787androidx.compose.ui.input.pointer.pointerInput
Tff7b72import T7ee787androidx.compose.ui.text.AnnotatedString
Tff7b72import T7ee787androidx.compose.ui.text.TextLayoutResult
Tff7b72import T7ee787androidx.compose.ui.text.font.FontWeight
Tff7b72import T7ee787androidx.compose.ui.text.style.TextAlign
Tff7b72import T7ee787androidx.compose.ui.unit.dp
Tff7b72import T7ee787org.jetbrains.compose.resources.StringResource
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.skip
T8b949e/**
* A generic layout for screens within the app introduction flow. It typically presents a headline, a descriptive text
* (potentially with clickable annotations), a list of features, and standard navigation buttons.
*
* @param headlineRes String resource for the main headline of the screen.
* @param annotatedDescription The [AnnotatedString] for the main descriptive text.
* @param features A list of [FeatureUIData] to be displayed using [FeatureRow].
* @param additionalContent Optional composable lambda for adding custom content below the features.
* @param onSkip Callback for the skip action.
* @param onConfigure Callback for the main configure/next action.
* @param configureButtonTextRes String resource for the main action button.
* @param onAnnotationClick Callback invoked when a tagged annotation within [annotatedDescription] is clicked.
*/
Tf0883e@Composable
Tff7b72internal Tff7b72fun Td2a8ffPermissionScreenLayoutTb4b4b4(
Te6edf3headlineResTb4b4b4: Te6edf3StringResourceTb4b4b4,
Te6edf3annotatedDescriptionTb4b4b4: Te6edf3AnnotatedStringTb4b4b4,
Te6edf3featuresTb4b4b4: Te6edf3ListTff7b72<Te6edf3FeatureUIDataTff7b72>Tb4b4b4,
Te6edf3additionalContentTb4b4b4: Tb4b4b4(Tf0883e@Composable Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4)Tff7b72? Tff7b72= Tff7b72nullTb4b4b4,
Te6edf3onSkipTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3onConfigureTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3configureButtonTextResTb4b4b4: Te6edf3StringResourceTb4b4b4,
Te6edf3onAnnotationClickTb4b4b4: Tb4b4b4(Tffa657StringTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72var Te6edf3textLayoutResult Tff7b72by Te6edf3remember Tb4b4b4{ Te6edf3mutableStateOfTff7b72<Te6edf3TextLayoutResult?Tff7b72>Tb4b4b4(Tff7b72nullTb4b4b4) Tb4b4b4}
Tff7b72val Te6edf3pressIndicator Tff7b72=
Te6edf3ModifierTb4b4b4.Te6edf3pointerInputTb4b4b4(Tffa657UnitTb4b4b4) Tb4b4b4{
Te6edf3detectTapGestures Tb4b4b4{ Te6edf3offset Tff7b72-Tff7b72>
Te6edf3textLayoutResultTff7b72?.Te6edf3let Tb4b4b4{ Te6edf3layoutResult Tff7b72-Tff7b72>
Tff7b72val Te6edf3position Tff7b72= Te6edf3layoutResultTb4b4b4.Te6edf3getOffsetForPositionTb4b4b4(Te6edf3offsetTb4b4b4)
Te6edf3annotatedDescriptionTb4b4b4.Te6edf3getStringAnnotationsTb4b4b4(
Te6edf3SETTINGS_TAGTb4b4b4,
Te6edf3positionTb4b4b4,
Te6edf3positionTb4b4b4,
Tb4b4b4)Tb4b4b4.Te6edf3firstOrNullTb4b4b4(Tb4b4b4)Tff7b72?.Te6edf3let Tb4b4b4{ Te6edf3annotation Tff7b72-Tff7b72>
Te6edf3onAnnotationClickTb4b4b4(Te6edf3annotationTb4b4b4.Te6edf3itemTb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Te6edf3ScaffoldTb4b4b4(
Te6edf3bottomBar Tff7b72= Tb4b4b4{
Te6edf3IntroBottomBarTb4b4b4(
Te6edf3onSkip Tff7b72= Te6edf3onSkipTb4b4b4,
Te6edf3onConfigure Tff7b72= Te6edf3onConfigureTb4b4b4,
Te6edf3configureButtonText Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3configureButtonTextResTb4b4b4)Tb4b4b4,
Te6edf3skipButtonText Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3skipTb4b4b4)Tb4b4b4,
Tb4b4b4)
Tb4b4b4}Tb4b4b4,
Tb4b4b4) Tb4b4b4{ Te6edf3innerPadding Tff7b72-Tff7b72>
Te6edf3ColumnTb4b4b4(
Te6edf3modifier Tff7b72=
Te6edf3ModifierTb4b4b4.Te6edf3fillMaxSizeTb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3paddingTb4b4b4(Te6edf3innerPaddingTb4b4b4)Tb4b4b4.Te6edf3paddingTb4b4b4(T79c0ff1T79c0ff6.Te6edf3dpTb4b4b4)Tb4b4b4.Te6edf3verticalScrollTb4b4b4(Te6edf3rememberScrollStateTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4,
Te6edf3horizontalAlignment Tff7b72= Te6edf3AlignmentTb4b4b4.Te6edf3CenterHorizontallyTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3TextTb4b4b4(
Te6edf3text Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3headlineResTb4b4b4)Tb4b4b4,
Te6edf3style Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3typographyTb4b4b4.Te6edf3headlineLargeTb4b4b4.Te6edf3copyTb4b4b4(Te6edf3fontWeight Tff7b72= Te6edf3FontWeightTb4b4b4.Te6edf3BoldTb4b4b4)Tb4b4b4,
Te6edf3textAlign Tff7b72= Te6edf3TextAlignTb4b4b4.Te6edf3CenterTb4b4b4,
Tb4b4b4)
Te6edf3SpacerTb4b4b4(Te6edf3modifier Tff7b72= Te6edf3ModifierTb4b4b4.Te6edf3heightTb4b4b4(T79c0ff1T79c0ff6.Te6edf3dpTb4b4b4)Tb4b4b4)
Te6edf3TextTb4b4b4(
Te6edf3text Tff7b72= Te6edf3annotatedDescriptionTb4b4b4,
Te6edf3style Tff7b72=
Te6edf3MaterialThemeTb4b4b4.Te6edf3typographyTb4b4b4.Te6edf3bodyLargeTb4b4b4.Te6edf3copyTb4b4b4(
Te6edf3color Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3colorSchemeTb4b4b4.Te6edf3onSurfaceTb4b4b4,
Te6edf3textAlign Tff7b72= Te6edf3TextAlignTb4b4b4.Te6edf3CenterTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3modifier Tff7b72= Te6edf3ModifierTb4b4b4.Te6edf3paddingTb4b4b4(Te6edf3horizontal Tff7b72= T79c0ff1T79c0ff6.Te6edf3dpTb4b4b4)Tb4b4b4.Te6edf3thenTb4b4b4(Te6edf3pressIndicatorTb4b4b4)Tb4b4b4,
Te6edf3onTextLayout Tff7b72= Tb4b4b4{ Te6edf3textLayoutResult Tff7b72= Tffa657it Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Te6edf3SpacerTb4b4b4(Te6edf3modifier Tff7b72= Te6edf3ModifierTb4b4b4.Te6edf3heightTb4b4b4(T79c0ff1T79c0ff6.Te6edf3dpTb4b4b4)Tb4b4b4)
Te6edf3featuresTb4b4b4.Te6edf3forEach Tb4b4b4{ Te6edf3feature Tff7b72-Tff7b72>
Te6edf3FeatureRowTb4b4b4(Te6edf3feature Tff7b72= Te6edf3featureTb4b4b4)
Te6edf3SpacerTb4b4b4(Te6edf3modifier Tff7b72= Te6edf3ModifierTb4b4b4.Te6edf3heightTb4b4b4(T79c0ff1T79c0ff6.Te6edf3dpTb4b4b4)Tb4b4b4)
Tb4b4b4}
Te6edf3additionalContentTff7b72?.Te6edf3invokeTb4b4b4(Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.2s